﻿@model NextAction.WebUI.Models.GtdTaskEditViewModel

@{
    ViewBag.Title = "Edit Task";
}


<div class="post" id="respond">

    <div class="post_title_left">
	<div class="post_title_right post_title_body">
        <h1>Edit Task</h1>
	</div>
    </div>
    <div class="post_body">

        @using (Html.BeginForm("Edit", "GtdTask"))
        {
    
            @Html.ValidationSummary()
            @Html.Hidden("GtdTask.TaskID", Model.GtdTask.TaskID)      
            @Html.Hidden("GtdTask.UserID", Model.GtdTask.UserID) 
            @Html.Hidden("GtdTask.TaskType", Model.GtdTask.TaskType) 

      		<p>
				<label>Name</label>
                @Html.EditorFor(x => x.GtdTask.Name)
			</p>
            
            <p>
                <label>Project</label>
                @Html.DropDownListFor(x => x.GtdTask.ProjectID, new SelectList(
                         Model.GtdProjects,
                         "ProjectID",
                         "Name",
                         Model.GtdTask.ProjectID))
            </p>
            
            <p>
                <label>Description</label>
                @Html.EditorFor(x => x.GtdTask.Description)
            </p>
            
            <p>
                <label>Priority</label>
                @Html.EditorFor(x => x.GtdTask.Priority)
            </p>
            
            <p>        
                <label>
                    @Html.EditorFor(x => x.GtdTask.IsCompleted)
                    Is completed
                </label>
            </p>
                        
            <p>        
                <input class="save_button" type="image" src="../Content/img/button_submit.gif"/>
                @Html.ActionLink("Cancel", "Index", "Collection")
            </p>
        }

    </div>
    <div class="post_bottom"></div>
</div>

